# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: Bastien Dejean <nihilhill@gmail.com>

pkgname=bspwm
pkgver=0.9.10
pkgrel=3
pkgdesc='Tiling window manager based on binary space partitioning'
arch=(loong64 x86_64)
url='https://github.com/baskerville/bspwm'
license=(BSD)
makedepends=(git)
depends=(xcb-util xcb-util-wm xcb-util-keysyms)
optdepends=('sxhkd: to define keyboard and pointer bindings'
            'xdo: for the example panel')
source=("git+$url#commit=2492695ad47c7ae8c630bdf22328334f57e41c1a") # tag: 0.9.10
md5sums=('SKIP')

build() {
  CFLAGS+=' -fcommon' # https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common
  make -C "$pkgname" PREFIX=/usr
}

package() {
  cd "$pkgname"

  make PREFIX=/usr DESTDIR="$pkgdir" install

  # BSD 2-clause
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

# getver: -u 2 raw.githubusercontent.com/baskerville/bspwm/master/doc/bspwm.1
# vim: ts=2 sw=2 et:
